@import '../core/style/variables';
@import '../core/style/layout-common';
@import 'tabs-common';

.mat-tab-group {
  display: flex;
  flex-direction: column;

  &.mat-tab-group-inverted-header {
    flex-direction: column-reverse;
  }
}

// Wraps each tab label
.mat-tab-label {
  @include tab-label;
  position: relative;
}

@media ($mat-xsmall) {
  .mat-tab-label {
    padding: 0 12px;
  }
}

@media ($mat-small) {
  .mat-tab-label {
    padding: 0 12px;
  }
}

.mat-tab-group[mat-stretch-tabs] .mat-tab-label {
  flex-basis: 0;
  flex-grow: 1;
}

// The bottom section of the view; contains the tab bodies
.mat-tab-body-wrapper {
  position: relative;
  overflow: hidden;
  display: flex;
  transition: height $mat-tab-animation-duration $ease-in-out-curve-function;
}

// Wraps each tab body
.mat-tab-body {
  @include mat-fill;
  display: block;
  overflow: hidden;

  // Fix for auto content wrapping in IE11
  flex-basis: 100%;

  &.mat-tab-body-active {
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 1;
    flex-grow: 1;
  }

  .mat-tab-group.mat-tab-group-dynamic-height &.mat-tab-body-active {
    overflow-y: hidden;
  }
}
